package com.mrd.gtimpframe.service;

import com.mrd.gtimpframe.entity.CargoDeclaRecord;
import com.mrd.gtimpframe.entity.Declaration;

import java.util.List;

public interface CargoDeclaRecordService {
    int deleteByPrimaryKey(String id);

    int insert(CargoDeclaRecord record);

    int insertSelective(CargoDeclaRecord record);

    CargoDeclaRecord selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(CargoDeclaRecord record);

    int updateByPrimaryKey(CargoDeclaRecord record);

    CargoDeclaRecord selectByDidAndUploadWay(String did, String uploadWay);

    CargoDeclaRecord selectByBusinessAndUploadWay(String businessNo, String uploadWay);

    CargoDeclaRecord selectByInvNoAndUploadWay(String invNo, String uploadWay);

    List<CargoDeclaRecord> selectByUploadWayAndStatusNotIn(String uploadWay, List<String> status);

    int batchUpdateByPrimaryKey(List<CargoDeclaRecord> list);

    List<CargoDeclaRecord> selectByDid(List<String> dids);

    /**
     * 新增记录并存入待上传队列
     */
    CargoDeclaRecord newRecord(Declaration declaration, String uploadWay, String comId);
}
